3.3.58 \(\int \frac {(e+f x)^2 \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx\) [258]

Optimal. Leaf size=75 \[ \frac {(e+f x)^3}{3 a f}-\frac {2 f^2 \cos (c+d x)}{a d^3}+\frac {(e+f x)^2 \cos (c+d x)}{a d}-\frac {2 f (e+f x) \sin (c+d x)}{a d^2} \]

[Out]

1/3*(f*x+e)^3/a/f-2*f^2*cos(d*x+c)/a/d^3+(f*x+e)^2*cos(d*x+c)/a/d-2*f*(f*x+e)*sin(d*x+c)/a/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4619, 32, 3377, 2718} \begin {gather*} -\frac {2 f^2 \cos (c+d x)}{a d^3}-\frac {2 f (e+f x) \sin (c+d x)}{a d^2}+\frac {(e+f x)^2 \cos (c+d x)}{a d}+\frac {(e+f x)^3}{3 a f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^2*Cos[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

(e + f*x)^3/(3*a*f) - (2*f^2*Cos[c + d*x])/(a*d^3) + ((e + f*x)^2*Cos[c + d*x])/(a*d) - (2*f*(e + f*x)*Sin[c +
 d*x])/(a*d^2)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4619

Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[1/a, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*S
in[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x)^2 \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int (e+f x)^2 \, dx}{a}-\frac {\int (e+f x)^2 \sin (c+d x) \, dx}{a}\\ &=\frac {(e+f x)^3}{3 a f}+\frac {(e+f x)^2 \cos (c+d x)}{a d}-\frac {(2 f) \int (e+f x) \cos (c+d x) \, dx}{a d}\\ &=\frac {(e+f x)^3}{3 a f}+\frac {(e+f x)^2 \cos (c+d x)}{a d}-\frac {2 f (e+f x) \sin (c+d x)}{a d^2}+\frac {\left (2 f^2\right ) \int \sin (c+d x) \, dx}{a d^2}\\ &=\frac {(e+f x)^3}{3 a f}-\frac {2 f^2 \cos (c+d x)}{a d^3}+\frac {(e+f x)^2 \cos (c+d x)}{a d}-\frac {2 f (e+f x) \sin (c+d x)}{a d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.23, size = 74, normalized size = 0.99 \begin {gather*} \frac {d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )+3 \left (-2 f^2+d^2 (e+f x)^2\right ) \cos (c+d x)-6 d f (e+f x) \sin (c+d x)}{3 a d^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^2*Cos[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

(d^3*x*(3*e^2 + 3*e*f*x + f^2*x^2) + 3*(-2*f^2 + d^2*(e + f*x)^2)*Cos[c + d*x] - 6*d*f*(e + f*x)*Sin[c + d*x])
/(3*a*d^3)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(214\) vs. \(2(73)=146\).
time = 0.14, size = 215, normalized size = 2.87

method result size
risch \(\frac {f^{2} x^{3}}{3 a}+\frac {f e \,x^{2}}{a}+\frac {e^{2} x}{a}+\frac {e^{3}}{3 a f}+\frac {\left (d^{2} x^{2} f^{2}+2 d^{2} e f x +d^{2} e^{2}-2 f^{2}\right ) \cos \left (d x +c \right )}{a \,d^{3}}-\frac {2 f \left (f x +e \right ) \sin \left (d x +c \right )}{a \,d^{2}}\) \(105\)
derivativedivides \(-\frac {-c^{2} f^{2} \cos \left (d x +c \right )+2 c d e f \cos \left (d x +c \right )-2 f^{2} c \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )-d^{2} e^{2} \cos \left (d x +c \right )+2 d e f \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )+f^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 c d e f \left (d x +c \right )+f^{2} c \left (d x +c \right )^{2}-d^{2} e^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) \(215\)
default \(-\frac {-c^{2} f^{2} \cos \left (d x +c \right )+2 c d e f \cos \left (d x +c \right )-2 f^{2} c \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )-d^{2} e^{2} \cos \left (d x +c \right )+2 d e f \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )+f^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 c d e f \left (d x +c \right )+f^{2} c \left (d x +c \right )^{2}-d^{2} e^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) \(215\)
norman \(\frac {\frac {2 d^{2} e^{2}+4 d e f -4 f^{2}}{a \,d^{3}}+\frac {4 f e \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d^{2} a}+\frac {\left (2 d^{2} e^{2}-4 f^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a \,d^{3}}+\frac {e \left (d e +2 f \right ) x}{d a}+\frac {f \left (d e +f \right ) x^{2}}{d a}+\frac {\left (d^{2} e^{2}-2 d e f -4 f^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,d^{2}}+\frac {\left (d^{2} e^{2}+2 d e f -4 f^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a \,d^{2}}+\frac {e \left (d e -2 f \right ) x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {f \left (d e -f \right ) x^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {f \left (d e -f \right ) x^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {f \left (d e +f \right ) x^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {f^{2} x^{3}}{3 a}+\frac {f^{2} x^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 a}+\frac {2 f^{2} x^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a}+\frac {2 f^{2} x^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a}+\frac {f^{2} x^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a}+\frac {f^{2} x^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a}+\frac {2 \left (d^{2} e^{2}+2 d e f -2 f^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,d^{3}}+\frac {2 \left (d^{2} e^{2}+2 d e f -2 f^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,d^{3}}+\frac {2 f e \,x^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 f e \,x^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 \left (d^{2} e^{2}-2 f^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,d^{2}}+\frac {2 \left (d^{2} e^{2}-2 f^{2}\right ) x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,d^{2}}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(623\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^2*cos(d*x+c)^2/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d^3/a*(-c^2*f^2*cos(d*x+c)+2*c*d*e*f*cos(d*x+c)-2*f^2*c*(sin(d*x+c)-(d*x+c)*cos(d*x+c))-d^2*e^2*cos(d*x+c)+
2*d*e*f*(sin(d*x+c)-(d*x+c)*cos(d*x+c))+f^2*(-(d*x+c)^2*cos(d*x+c)+2*cos(d*x+c)+2*(d*x+c)*sin(d*x+c))-c^2*f^2*
(d*x+c)+2*c*d*e*f*(d*x+c)+f^2*c*(d*x+c)^2-d^2*e^2*(d*x+c)-d*e*f*(d*x+c)^2-1/3*f^2*(d*x+c)^3)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (73) = 146\).
time = 0.51, size = 309, normalized size = 4.12 \begin {gather*} \frac {6 \, c^{2} f^{2} {\left (\frac {1}{a d^{2} + \frac {a d^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a d^{2}}\right )} - 12 \, c e f {\left (\frac {1}{a d + \frac {a d \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a d}\right )} + 6 \, e^{2} {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}\right )} + \frac {3 \, {\left ({\left (d x + c\right )}^{2} + 2 \, {\left (d x + c\right )} \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right )\right )} e f}{a d} - \frac {3 \, {\left ({\left (d x + c\right )}^{2} + 2 \, {\left (d x + c\right )} \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right )\right )} c f^{2}}{a d^{2}} + \frac {{\left ({\left (d x + c\right )}^{3} + 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 6 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} f^{2}}{a d^{2}}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/3*(6*c^2*f^2*(1/(a*d^2 + a*d^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2) + arctan(sin(d*x + c)/(cos(d*x + c) + 1)
)/(a*d^2)) - 12*c*e*f*(1/(a*d + a*d*sin(d*x + c)^2/(cos(d*x + c) + 1)^2) + arctan(sin(d*x + c)/(cos(d*x + c) +
 1))/(a*d)) + 6*e^2*(arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a + 1/(a + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)
) + 3*((d*x + c)^2 + 2*(d*x + c)*cos(d*x + c) - 2*sin(d*x + c))*e*f/(a*d) - 3*((d*x + c)^2 + 2*(d*x + c)*cos(d
*x + c) - 2*sin(d*x + c))*c*f^2/(a*d^2) + ((d*x + c)^3 + 3*((d*x + c)^2 - 2)*cos(d*x + c) - 6*(d*x + c)*sin(d*
x + c))*f^2/(a*d^2))/d

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 97, normalized size = 1.29 \begin {gather*} \frac {d^{3} f^{2} x^{3} + 3 \, d^{3} f x^{2} e + 3 \, d^{3} x e^{2} + 3 \, {\left (d^{2} f^{2} x^{2} + 2 \, d^{2} f x e + d^{2} e^{2} - 2 \, f^{2}\right )} \cos \left (d x + c\right ) - 6 \, {\left (d f^{2} x + d f e\right )} \sin \left (d x + c\right )}{3 \, a d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(d^3*f^2*x^3 + 3*d^3*f*x^2*e + 3*d^3*x*e^2 + 3*(d^2*f^2*x^2 + 2*d^2*f*x*e + d^2*e^2 - 2*f^2)*cos(d*x + c)
- 6*(d*f^2*x + d*f*e)*sin(d*x + c))/(a*d^3)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 605 vs. \(2 (65) = 130\).
time = 2.93, size = 605, normalized size = 8.07 \begin {gather*} \begin {cases} \frac {3 d^{3} e^{2} x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {3 d^{3} e^{2} x}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {3 d^{3} e f x^{2} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {3 d^{3} e f x^{2}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {d^{3} f^{2} x^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {d^{3} f^{2} x^{3}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {6 d^{2} e^{2}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} - \frac {6 d^{2} e f x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {6 d^{2} e f x}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} - \frac {3 d^{2} f^{2} x^{2} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} + \frac {3 d^{2} f^{2} x^{2}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} - \frac {12 d e f \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} - \frac {12 d f^{2} x \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} - \frac {12 f^{2}}{3 a d^{3} \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 3 a d^{3}} & \text {for}\: d \neq 0 \\\frac {\left (e^{2} x + e f x^{2} + \frac {f^{2} x^{3}}{3}\right ) \cos ^{2}{\left (c \right )}}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**2*cos(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((3*d**3*e**2*x*tan(c/2 + d*x/2)**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + 3*d**3*e**2*x/(3*a*d*
*3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + 3*d**3*e*f*x**2*tan(c/2 + d*x/2)**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d
**3) + 3*d**3*e*f*x**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + d**3*f**2*x**3*tan(c/2 + d*x/2)**2/(3*a*d**
3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + d**3*f**2*x**3/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + 6*d**2*e**2/(3*
a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) - 6*d**2*e*f*x*tan(c/2 + d*x/2)**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*
d**3) + 6*d**2*e*f*x/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) - 3*d**2*f**2*x**2*tan(c/2 + d*x/2)**2/(3*a*d**
3*tan(c/2 + d*x/2)**2 + 3*a*d**3) + 3*d**2*f**2*x**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) - 12*d*e*f*tan(
c/2 + d*x/2)/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3) - 12*d*f**2*x*tan(c/2 + d*x/2)/(3*a*d**3*tan(c/2 + d*x/
2)**2 + 3*a*d**3) - 12*f**2/(3*a*d**3*tan(c/2 + d*x/2)**2 + 3*a*d**3), Ne(d, 0)), ((e**2*x + e*f*x**2 + f**2*x
**3/3)*cos(c)**2/(a*sin(c) + a), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 33978 vs. \(2 (76) = 152\).
time = 7.83, size = 33978, normalized size = 453.04 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/3*(d^3*f^2*x^3*tan(1/2*d*x)^3*tan(1/2*c)^5*tan(c)^2 - d^3*f^2*x^3*tan(1/2*d*x)^3*tan(1/2*c)^4*tan(c)^2 - d^3
*f^2*x^3*tan(1/2*d*x)^2*tan(1/2*c)^5*tan(c)^2 - 3*d^3*f*x^2*e*tan(1/2*d*x)^3*tan(1/2*c)^5*tan(c)^2 + d^3*f^2*x
^3*tan(1/2*d*x)^3*tan(1/2*c)^5 + 2*d^3*f^2*x^3*tan(1/2*d*x)^3*tan(1/2*c)^3*tan(c)^2 - d^3*f^2*x^3*tan(1/2*d*x)
^2*tan(1/2*c)^4*tan(c)^2 + 3*d^3*f*x^2*e*tan(1/2*d*x)^3*tan(1/2*c)^4*tan(c)^2 + d^3*f^2*x^3*tan(1/2*d*x)*tan(1
/2*c)^5*tan(c)^2 + 3*d^3*f*x^2*e*tan(1/2*d*x)^2*tan(1/2*c)^5*tan(c)^2 + 3*d^2*f^2*x^2*tan(1/2*d*x)^3*tan(1/2*c
)^5*tan(c)^2 - d^3*f^2*x^3*tan(1/2*d*x)^3*tan(1/2*c)^4 - d^3*f^2*x^3*tan(1/2*d*x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tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan
(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)^2*tan(1/2*c)^5*tan(c) + 6*pi*d*f*e*tan(1/2*d*x)^3*tan(1/
2*c)^5*tan(c) + 12*d*f*arctan((tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*
c) + tan(1/2*d*x) + tan(1/2*c) - 1))*e*tan(1/2*d*x)^3*tan(1/2*c)^5*tan(c) + 6*d^2*e^2*log(2*(tan(1/2*d*x)^4*ta
n(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*t
an(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x
) + 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^3*tan(1/2*c)^5*tan(c) - d^3*f^2*x^3*tan(1/2*d*x)^3*tan(
c)^2 - d^3*f^2*x^3*tan(1/2*d*x)^2*tan(1/2*c)*tan(c)^2 - 3*d^3*f*x^2*e*tan(1/2*d*x)^3*tan(1/2*c)*tan(c)^2 - 2*d
^3*f^2*x^3*tan(1/2*d*x)*tan(1/2*c)^2*tan(c)^2 - 18*d^3*f*x^2*e*tan(1/2*d*x)^2*tan(1/2*c)^2*tan(c)^2 - 2*d^3*f^
2*x^3*tan(1/2*c)^3*tan(c)^2 + 18*d^3*f*x^2*e*tan(1/2*d*x)*tan(1/2*c)^3*tan(c)^2 + 12*d^2*f^2*x^2*tan(1/2*d*x)^
2*tan(1/2*c)^3*tan(c)^2 + 18*d^3*x*e^2*tan(1/2*...

________________________________________________________________________________________

Mupad [B]
time = 2.96, size = 110, normalized size = 1.47 \begin {gather*} \frac {e^2\,x+e\,f\,x^2+\frac {f^2\,x^3}{3}}{a}-\frac {2\,f^2\,\cos \left (c+d\,x\right )-d^2\,\left (e^2\,\cos \left (c+d\,x\right )+f^2\,x^2\,\cos \left (c+d\,x\right )+2\,e\,f\,x\,\cos \left (c+d\,x\right )\right )+d\,\left (2\,x\,\sin \left (c+d\,x\right )\,f^2+2\,e\,\sin \left (c+d\,x\right )\,f\right )}{a\,d^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^2*(e + f*x)^2)/(a + a*sin(c + d*x)),x)

[Out]

(e^2*x + (f^2*x^3)/3 + e*f*x^2)/a - (2*f^2*cos(c + d*x) - d^2*(e^2*cos(c + d*x) + f^2*x^2*cos(c + d*x) + 2*e*f
*x*cos(c + d*x)) + d*(2*f^2*x*sin(c + d*x) + 2*e*f*sin(c + d*x)))/(a*d^3)

________________________________________________________________________________________